Last updated: 2024-03-08

Checks: 6 1

Knit directory: project_oddball_LEAP/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20230119) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 75092b9. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .PowerFolder/
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    desktop.ini
    Ignored:    manuscript/
    Ignored:    output/figures/
    Ignored:    output/supplements/

Unstaged changes:
    Modified:   analysis/oddball_leap_supplements.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/oddball_leap_supplements.Rmd) and HTML (docs/oddball_leap_supplements.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 75092b9 nicobast 2023-11-07 internal revision - Nov 2023
Rmd 4277e45 nicobast 2023-10-23 internal revision 231023
Rmd cce2734 nicobast 2023-10-20 internal revision - full markdown knit
Rmd d2ac698 nicobast 2023-07-20 state of first complete draft
Rmd ff4532e nicobast 2023-07-19 single supplements doc

supplement 1

table output
Per-participant level: Descriptive statistics of baseline pupil size (BPS), stimulus-evoked pupillary response (SEPR), mismatch negativity (MMN), and neural gain (NG)
variable n mean sd min max skew kurtosis
BPS 322 3.445 0.522 2.256 5.884 0.702 1.188
SEPR - standard 322 -0.001 0.005 -0.035 0.044 2.509 40.702
SEPR - pitch oddball 316 0.001 0.009 -0.077 0.023 -3.937 31.571
SEPR - length oddball 318 0.000 0.009 -0.046 0.100 4.223 46.168
SEPR - pitch+length oddball 317 0.000 0.006 -0.033 0.018 -1.227 4.825
MMN - standard 241 -10.641 3.570 -23.246 -3.316 -0.766 0.559
MMN - pitch oddball 240 -11.551 3.907 -21.863 -3.060 -0.536 -0.397
MMN - length oddball 240 -11.881 3.672 -22.399 -3.680 -0.500 -0.142
MMN - pitch+length oddball 240 -11.741 3.852 -23.071 -0.170 -0.433 0.109
NG 267 0.006 0.044 -0.164 0.182 1.125 6.408

supplement 2

table output
Per-trial level: Descriptive statistics of baseline pupil size (BPS), stimulus-evoked pupillary response (SEPR), and mismatch negativity (MMN)
variable n mean sd min max skew kurtosis
BPS 298934 3.407 0.550 1.952 6.399 0.629 0.986
SEPR - standard 248260 -0.001 0.034 -0.352 0.303 -0.536 3.585
SEPR - pitch oddball 14758 0.001 0.034 -0.256 0.219 -0.514 3.597
SEPR - length oddball 17419 -0.001 0.033 -0.268 0.222 -0.517 3.154
SEPR - pitch+length oddball 18497 0.001 0.034 -0.247 0.240 -0.494 3.093
MMN - standard 13148 -10.558 9.064 -69.143 50.221 -0.791 2.441
MMN - pitch oddball 10738 -11.281 9.237 -94.139 24.670 -1.048 3.412
MMN - length oddball 10730 -11.701 9.355 -88.872 32.803 -0.865 2.678
MMN - pitch+length oddball 11004 -11.443 9.192 -87.129 68.538 -0.746 3.373

supplement 3

table output
Per-participant level: Group comparisons of baseline pupil size (BPS), stimulus-evoked pupillary response (SEPR), mismatch negativity (MMN), and neural gain (NG)
F df1 df2 b std. error p
BPS - across stimuli 5.208 1 320 -0.257 0.113 0.023
NG - standards 4.913 1 121 -0.401 0.181 0.029
SEPR - standards 0.14 1 320 -0.042 0.114 0.709
SEPR - pitch oddball 0.213 1 314 0.053 0.114 0.645
SEPR - length oddball 0.535 1 316 0.083 0.114 0.465
SEPR - pitch+length oddball 0.071 1 315 0.03 0.114 0.79
MMN - standards 0.027 1 239 0.022 0.132 0.869
MMN - pitch oddball 1.648 1 238 0.169 0.132 0.201
MMN - length oddball 1.552 1 238 0.164 0.132 0.214
MMN - pitch+length oddball 0.83 1 238 0.12 0.132 0.363

supplement 4

table output
Per participant: Full Linear model of baseline pupil size (BPS) with all potential covariates
Sum Sq df F p
intercept 1.062 1 1.266 0.261
group 2.688 1 3.204 0.074
age 48.850 1 58.222 0.000
perceptual IQ 3.939 1 4.694 0.031
sex 1.218 1 1.452 0.229
sampling rate 0.049 1 0.058 0.810
gaze center deviation 0.005 1 0.005 0.941
data quality 0.228 1 0.272 0.603
residuals 263.452 314 NA NA
table output
Per participant: Reduced Linear model of baseline pupil size (BPS) with significant covariates
Sum Sq df F p
intercept 0.973 1 1.168 0.281
group 2.349 1 2.819 0.094
age 49.387 1 59.272 0.000
perceptual IQ 4.796 1 5.756 0.017
residuals 264.967 318 NA NA

supplement 5

table output
Per participant: Full Linear model of neural gain (NG) with all potential covariates
Sum Sq df F p
intercept 0.592 1 0.587 0.445
group 3.753 1 3.719 0.056
age 0.763 1 0.756 0.386
perceptual IQ 0.108 1 0.108 0.744
sex 0.074 1 0.073 0.787
sampling rate 0.000 1 0.000 0.998
gaze center deviation 0.253 1 0.251 0.618
data quality 0.183 1 0.182 0.671
residuals 116.044 115 NA NA
table output
Per participant: Reduced Linear model of neural gain (NG) with significant covariates
Sum Sq df F p
intercept 1.935 1 1.997 0.160
group 4.761 1 4.913 0.029
residuals 117.239 121 NA NA

supplement 6

A higher proportion of autistic versus non-autistic individuals received medication (ASD: 46.7%, non-ASD: 18.2%, Chi² = 17.95, p < .001). 12 autistic and 2 non-autistic participants received more than one medication. Medication was primarily related to comorbid symptoms in those receiving medication (melatonin: 23%, methlphenidate: 22%, selective serotonin reuptake inhibitor: 15%, antiepileptics: 11%, risperidone: 7%, atomoxetine: 6%, other: 16%). We calculated a variable whether participants received any medication (yes versus no), which was included as a covariate into models that reported group differences.

On a per participant level, the inclusion of medication did not have an effect on baseline pupil size (BPS) or neuronal gain (NG) and did not alter the group differences (BPS: F(1, 319) = 5.19, p = .023; NG: F(1, 120) = 4.90, p = .028).

For the dynamic BPS model, medication had a significant effect on the cubic fit of BPS (F(1, 294641) = 15.52, p < .001) and was described by a higher mean BPS for medication (0.03 [0.01, 0.04]). However, this covariate effect did not alter the group differences in dynamic BPS (F(3, 298714) = 12.53, p < .001).

For the dynamic SEPR and MMN model, medication did not have a significant effect on SEPR or MMN (F < 1) and did not alter the group difference interactions (SEPR: F(3, 298711) = 3.28, p = .017; MMN: F(3, 45406) = 2.71, p = .043).

supplement 7

supplement 8

supplement 9

supplement 10

table output
correlations of baseline pupil size (BPS), stimulus-evoked pupillary response (SEPR), mismatch negativity (MMN), and neural gain (NG) for different stimuli.
correlation coefficient (r) p p adjusted
SEPR (standard) and BPS 0.0647 0.2466 1.0000
SEPR (pitch oddball) and BPS -0.0361 0.5230 1.0000
SEPR (length oddball) and BPS 0.1512 0.0069 0.1656
SEPR (pitch+length oddball) and BPS -0.1502 0.0074 0.1776
SEPR (standard) and MMN (standard) -0.0445 0.4915 1.0000
SEPR (pitch oddball) and MMN (pitch oddball) 0.0731 0.2595 1.0000
SEPR (length oddball) and MMN (length oddball) 0.0387 0.5510 1.0000
SEPR (pitch+length oddball) and MMN (pitch+length oddball) -0.0063 0.9227 1.0000
BPS and MMN (standard) -0.1947 0.0024 0.0576
BPS and MMN (pitch oddball) -0.2292 0.0003 0.0072
BPS and MMN (length oddball) -0.2151 0.0008 0.0192
BPS and MMN (pitch+length oddball) -0.2008 0.0018 0.0432
NG and BPS -0.0159 0.7964 1.0000
NG and BPS -0.0159 0.7964 1.0000
NG and BPS -0.0159 0.7964 1.0000
NG and BPS -0.0159 0.7964 1.0000
NG and SEPR (standard) -0.0053 0.9318 1.0000
NG and SEPR (pitch oddball) 0.0055 0.9292 1.0000
NG and SEPR (length oddball) -0.0427 0.4897 1.0000
NG and SEPR (pitch+length oddball) -0.0906 0.1429 1.0000
NG and MMN (standard) -0.0198 0.7835 1.0000
NG and MMN (pitch oddball) -0.0597 0.4055 1.0000
NG and MMN (length oddball) -0.1025 0.1530 1.0000
NG and MMN (pitch+length oddball) -0.0393 0.5840 1.0000

supplement 11

table output
Model comparison on the linearity of trial number on baseline pupil size (BPS)
number of parameters AIC BIC log likelihood deviance Chi-squared df p-value
linear fit 5 447549.2 447602.2 -223769.6 447539.2 NA NA NA
quadratic fit 6 444544.2 444607.8 -222266.1 444532.2 3007.00562 1 0
cubic fit 7 444502.4 444576.6 -222244.2 444488.4 43.80701 1 0
table output
Model comparison on the linearity of trial number on stimulus-evoked pupillary response (SEPR)
number of parameters AIC BIC log likelihood deviance Chi-squared df p-value
linear fit 5 847877.2 847930.3 -423933.6 847867.2 NA NA NA
quadratic fit 6 847876.0 847939.6 -423932.0 847864.0 3.228135 1 0.0723831
cubic fit 7 847857.4 847931.7 -423921.7 847843.4 20.558183 1 0.0000058
table output
Model comparison on the linearity of trial number on mismatch negativity (MMN)
number of parameters AIC BIC log likelihood deviance Chi-squared df p-value
linear fit 5 124241.2 124284.8 -62115.59 124231.2 NA NA NA
quadratic fit 6 124236.6 124289.0 -62112.30 124224.6 6.593229 1 0.0102367
cubic fit 7 124230.6 124291.7 -62108.28 124216.6 8.039332 1 0.0045772

supplement 12

table output
Linear mixed model: baseline pupil size (BPS) - task progression
Sum Sq Mean Sq df1 df2 F p adjusted
stimulus (S) 7.716 2.572 3 298664.131 10.077 0.000
group 0.026 0.026 1 206.697 0.102 0.750
task progression (TP) 217.440 72.480 3 298670.314 283.965 0.000
age 65.497 65.497 1 225.068 256.607 0.000
perceptual IQ 0.514 0.514 1 206.874 2.015 0.157
sex 0.372 0.372 1 205.630 1.456 0.229
sampling rate 384.515 384.515 1 212854.336 1506.465 0.000
gaze center deviation 30.051 30.051 1 243201.221 117.733 0.000
data quality 122.061 122.061 1 298692.298 478.215 0.000
S x group 1.861 0.620 3 298664.118 2.430 0.063
S x TP 23.246 2.583 9 298664.319 10.119 0.000
group x TP 9.441 3.147 3 298673.812 12.329 0.000
S x group x TP 1.110 0.123 9 298664.299 0.483 0.887
table output
Covariate effects on baseline pupil size (BPS)
covariate estimate lower bound (2.5%) upper bound (97.5%)
age (yrs) -0.56 -0.63 -0.48
sampling rate (300Hz vs. 120Hz) 0.17 0.16 0.18
gaze center deviation (%) 0.02 0.01 0.02
missing data per trial (%) 0.02 0.02 0.02

supplement 13

In this supplementary analyses, we investigated stimulus habituation of baseline pupil size (BPS), stimulus-evoked pupillary response (SEPR), and mismatch-negativity-associated amplitude. For these analyses, we exchanged the fixed effect of task progression with sequence position, i.e., trials since last oddball. This was modeled for sequence position as continuous variable (sequence position: 1-10) or as categorical variable (sequence position: 1 vs. 2 vs. 3).

BPS did not differ between groups for sequence position as continuous (F(1,246853) = 1.45, p = .229) or categorical variable (F(1,133874) < 1). When limiting the analysis to the frequent standard stimuli (mR² = 0.01, cR² = 0.76, figure 4 – top right), BPS was characterized by an interaction of group x sequence position (F(1,204703) = 3.87, p = .049, BF < 1), which was not moderated by including covariates (F(1,204685) = 3.99, p < .045, supplement 14). Post-hoc analysis showed that the autistic group was associated with a BPS increase for standard stimuli in a sequence (Δβ = 0.01 [0.00, 0.02]) compared to the non-autistic group (Δβ = -0.01 [-0.02, 0.00]). This is supported by Bayesian posterior estimates that showed a BPS increase with standard stimuli sequences (b = 0.20 [0.07, 0.30]) compared to non-autistic individuals (b = 0.00 [0.00, 0.00]).

SEPR did not differ between groups for sequence position as continuous (F(1,246857) = 2.11, p = .146). For sequence position as categorical variable (1 vs. 2 vs. 3, mR² = 0.00, cR² = 0.00), SEPR was characterized by an interaction of group x sequence position (F(2,133893) = 3.43, p = .032, BF < 1), which was not moderated by the inclusion of covariates (F(2,133891) = 3.45, p < .031, supplement 16). Post-hoc analysis showed that this was driven by a lower SEPR to pitch oddballs at sequence position 2 in autistic versus non-autistic individuals (Δβ = -0.10 [-0.18, -0.02]). This was not supported by Bayesian posterior sampling that showed no group differences in posterior estimates.

MMN-amp differed between groups for sequence position as continuous variable (mR² = 0.01, cR² = 0.13), MMN-amp was characterized by an interaction of group x stimulus (F(3, 37901) = 2.29, p = 0.045, BF < 1), which was not moderated by the inclusion of covariates (F(3, 37906) = 2.67, p = 0.045, supplement 18). Post-hoc analysis showed a higher MMN-amp for oddball versus standard trials in autistic individuals (pitch: Δβ = 0.10 [0.06, 0.15]; length: Δβ = 0.15 [0.10, 0.19]; pitch & length: Δβ = 0.12 [0.07, 0.17]), compared to non-autistic individuals (pitch: Δβ = 0.02 [-0.03, 0.08]; length: Δβ = 0.07 [0.01, 0.13]; pitch & length: Δβ = 0.05 [0.00, 0.11]). This was not supported by Bayesian posterior sampling that showed no group differences in posterior estimates. For sequence position as categorical variable, MMN-amp did not differ between groups (F(3, 19273 = 1.57, p = 0.19).

supplement 14

table output
Linear mixed model: baseline pupil size (BPS) - habituation
Sum Sq Mean Sq df1 df2 F p adjusted
group 0.039 0.039 1 203.357 0.149 0.700
sequence position - continuous (SP) 0.120 0.120 1 204683.934 0.456 0.500
age 55.512 55.512 1 66.261 211.512 0.000
perceptual IQ 0.518 0.518 1 203.466 1.972 0.162
sex 0.366 0.366 1 202.854 1.394 0.239
sampling rate 280.262 280.262 1 87200.771 1067.853 0.000
gaze center deviation 25.843 25.843 1 140835.465 98.466 0.000
data quality 91.844 91.844 1 204711.585 349.944 0.000
group x SP 1.048 1.048 1 204684.867 3.992 0.046

supplement 15

table output
Linear mixed model: stimulus-evoked pupillary response (SEPR) - task progression
Sum Sq Mean Sq df1 df2 F p adjusted
stimulus (S) 21.908 7.303 3 298694.067 7.332 0.000
group 0.045 0.045 1 1867.099 0.045 0.831
task progression (TP) 0.028 0.028 1 297216.936 0.028 0.867
age 0.147 0.147 1 192.082 0.147 0.702
perceptual IQ 1.088 1.088 1 183.975 1.093 0.297
sex 0.313 0.313 1 182.635 0.314 0.576
sampling rate 0.283 0.283 1 3426.834 0.284 0.594
gaze center deviation 2.002 2.002 1 720.042 2.010 0.157
data quality 252.632 252.632 1 225912.957 253.639 0.000
S x group 7.956 2.652 3 298693.869 2.662 0.046
S x TP 2.233 0.744 3 298695.326 0.747 0.524
group x TP 0.282 0.282 1 298634.746 0.283 0.594
S x group x TP 10.146 3.382 3 298694.753 3.395 0.017
table output
Covariate effects on stimulus-evoked pupillary response (SEPR)
covariate estimate lower bound (2.5%) upper bound (97.5%)
missing data per trial (%) -0.03 -0.03 -0.03

supplement 16

table output
Linear mixed model: stimulus-evoked pupillary response (SEPR) - habituation
Sum Sq Mean Sq df1 df2 F p adjusted
stimulus (S) 12.158 4.053 3 133932.010 4.066 0.007
group 0.025 0.025 1 1380.862 0.025 0.875
sequence position - categorical (SP) 1.067 0.534 2 133961.039 0.535 0.585
age 0.025 0.025 1 181.831 0.025 0.875
perceptual IQ 1.701 1.701 1 167.970 1.707 0.193
sex 1.018 1.018 1 166.423 1.021 0.314
sampling rate 2.469 2.469 1 1331.542 2.477 0.116
gaze center deviation 1.009 1.009 1 447.577 1.012 0.315
data quality 127.094 127.094 1 89909.980 127.524 0.000
S x group 0.280 0.093 3 133892.441 0.094 0.964
S x SP 15.177 2.529 6 133911.067 2.538 0.019
group x SP 6.895 3.447 2 133891.238 3.459 0.031
S x group x SP 8.784 1.757 5 133887.203 1.763 0.117

supplement 17

table output
Linear mixed model: mismatch negativity - task progression
Sum Sq Mean Sq df1 df2 F p adjusted
stimulus (S) 27.812 9.271 3 45391.757 10.559 0.000
group 1.077 1.077 1 302.409 1.227 0.269
task progression (TP) 3.724 3.724 1 45382.911 4.242 0.039
age 108.521 108.521 1 229.741 123.600 0.000
perceptual IQ 0.102 0.102 1 229.560 0.117 0.733
sex 1.701 1.701 1 228.781 1.937 0.165
sampling rate 1.606 1.606 1 10137.119 1.829 0.176
gaze center deviation 2.567 2.567 1 226.455 2.923 0.089
data quality 3.715 3.715 1 45575.232 4.231 0.040
S x group 3.883 1.294 3 45391.262 1.474 0.219
S x TP 3.714 1.238 3 45416.556 1.410 0.238
group x TP 3.584 3.584 1 45586.756 4.083 0.043
S x group x TP 7.187 2.396 3 45416.859 2.728 0.042
table output
Covariate effects on mismatch negativity (MMN)
covariate estimate lower bound (2.5%) upper bound (97.5%)
age (yrs) 0.22 0.18 0.26
missing data per trial (%) -0.01 -0.02 0

supplement 18

table output
Linear mixed model: mismatch negativity - habituation
Sum Sq Mean Sq df1 df2 F p adjusted
stimulus (S) 87.246 29.082 3 45445.346 33.113 0.000
group 0.143 0.143 1 229.963 0.163 0.686
sequence position - continuous (SP) 0.003 0.003 1 45416.726 0.004 0.952
age 108.333 108.333 1 229.731 123.347 0.000
perceptual IQ 0.127 0.127 1 229.463 0.145 0.704
sex 1.669 1.669 1 228.787 1.901 0.169
sampling rate 0.754 0.754 1 10982.989 0.859 0.354
gaze center deviation 2.491 2.491 1 226.442 2.836 0.094
data quality 3.563 3.563 1 45574.546 4.056 0.044
S x group 11.056 3.685 3 45444.126 4.196 0.006
S x SP 2.504 0.835 3 45409.835 0.950 0.415
group x SP 2.135 2.135 1 45418.100 2.431 0.119
S x group x SP 0.198 0.066 3 45409.906 0.075 0.973

supplement 19

supplement 20

supplement 21


R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=English_Germany.utf8  LC_CTYPE=English_Germany.utf8   
[3] LC_MONETARY=English_Germany.utf8 LC_NUMERIC=C                    
[5] LC_TIME=English_Germany.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tiff_0.1-11     knitr_1.41      htmltools_0.5.4

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9       highr_0.9        pillar_1.9.0     compiler_4.2.2  
 [5] bslib_0.4.1      later_1.3.0      jquerylib_0.1.4  git2r_0.30.1    
 [9] workflowr_1.7.0  tools_4.2.2      digest_0.6.30    jsonlite_1.8.4  
[13] evaluate_0.18    lifecycle_1.0.3  tibble_3.2.1     pkgconfig_2.0.3 
[17] rlang_1.1.1      cli_3.6.1        rstudioapi_0.14  yaml_2.3.6      
[21] xfun_0.35        fastmap_1.1.0    stringr_1.5.0    fs_1.5.2        
[25] vctrs_0.6.2      sass_0.4.4       rprojroot_2.0.3  grid_4.2.2      
[29] glue_1.6.2       R6_2.5.1         fansi_1.0.3      rmarkdown_2.18  
[33] magrittr_2.0.3   whisker_0.4.1    promises_1.2.0.1 httpuv_1.6.6    
[37] utf8_1.2.2       stringi_1.7.8    cachem_1.0.6